/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.network;

import java.io.IOException;
import java.net.Socket;

/**
 *
 * @author Garys
 */
public class Session extends ClientConnection implements SessionCreator<Session> {

    /**
     * 
     */
    protected Thread listener = null;

    /**
     * 
     * @return
     */
    public Thread getListener() {
        return listener;
    }

    
    /**
     * 
     * @param thread
     */
    public void setListener(Thread thread) {
        this.listener = thread;
    }

    /**
     * 
     * @param socket
     * @return
     * @throws IOException
     */
    @Override
    public Session create(Socket socket) throws IOException {
        return new Session(socket);
    }

    /**
     * 
     * @param socket
     * @throws IOException
     */
    public Session(Socket socket) throws IOException {
        this.socket = socket;
    }

    /**
     * 
     * @return
     */
    @Override
    public boolean connect() {
        return true;
    }

    /**
     * 
     * @return
     */
    @Override
    public boolean isServer() {
        return true;
    }

    

    
}
